﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NhapSachMoi.ascx.cs" Inherits="NhapSachMoi" %>
<style type="text/css">

    .style4
    {
        height: 63px;
    }
    </style>
<table cellspacing="6px" align="left">
    <tr>
        <td align="left" valign="top" rowspan="12" width="12px">
            <br />
            <img alt="" src="HinhGiaoDienWeb/0.PNG" style="width: 10px; height: 10px" /><br />
        </td>
        <td align="right" 
            style="font-family: Arial, Helvetica, sans-serif; font-size: medium; color: #00CCFF" 
            valign="top" width="180px">
            Tên sách:</td>
        <td align="left" valign="top" width="300px">
            <asp:TextBox ID="txtTenSach" runat="server" BorderColor="#00CCFF" 
                BorderStyle="Dotted" Font-Bold="True" Font-Size="Medium" ForeColor="#00CCFF" 
                Width="280px" BackColor="#FCF8FD"></asp:TextBox>
        </td>
        <td align="left" valign="top" width="20px">
            <asp:RangeValidator ID="RangeValidator1" runat="server" 
                ControlToValidate="txtTenSach" ErrorMessage="Bạn chưa nhập tên sách" 
                ForeColor="#0099FF">(*)</asp:RangeValidator>
        </td>
    </tr>
    <tr>
        <td align="right" 
            style="font-family: Arial, Helvetica, sans-serif; font-size: medium; color: #00CCFF" 
            valign="top" width="180px">
            Tác giả:</td>
        <td align="left" valign="top" width="300px">
            <asp:DropDownList ID="dropMaTacGia" runat="server" BackColor="#FCF8FD" 
                DataSourceID="ObjectDataSource2" DataTextField="TenTG" DataValueField="MaTG" 
                Font-Italic="False" Font-Size="Medium" ForeColor="#00CCFF" Width="280px" 
                Font-Bold="True">
            </asp:DropDownList>
        </td>
        <td align="left" valign="top" width="20px">
            &nbsp;</td>
    </tr>
    <tr>
        <td align="Right" 
            style="font-family: Arial, Helvetica, sans-serif; font-size: medium; color: #00CCFF" 
            valign="top" width="180px">
            Nhà xuất bản:</td>
        <td align="left" valign="top" width="300px">
            <asp:DropDownList ID="dropMaNXB" runat="server" BackColor="#FCF8FD" 
                DataSourceID="ObjectDataSource3" DataTextField="TenNXB" DataValueField="MaNXB" 
                Font-Italic="False" Font-Size="Medium" ForeColor="#00CCFF" Width="280px" 
                Font-Bold="True">
            </asp:DropDownList>
        </td>
        <td align="left" valign="top" width="20px">
            </td>
    </tr>
    <tr>
        <td align="right" 
            style="font-family: Arial, Helvetica, sans-serif; font-size: medium; color: #00CCFF" 
            valign="top" width="180px">
            Thông tin sách:</td>
        <td align="left" valign="top" width="300px">
            <asp:TextBox ID="txtThongTinSach" runat="server" AutoPostBack="True" 
                BorderColor="#00CCFF" BorderStyle="Dotted" Font-Bold="True" Font-Size="Medium" 
                Height="200px" MaxLength="10000" TextMode="MultiLine" Width="280px" 
                ForeColor="#00CCFF" BackColor="#FCF8FD"></asp:TextBox>
        </td>
        <td align="left" valign="top" width="20px">
            <asp:RangeValidator ID="RangeValidator2" runat="server" 
                ControlToValidate="txtThongTinSach" ErrorMessage="Bạn chưa nhập thông tin sách" 
                ForeColor="#0099FF">(*)</asp:RangeValidator>
        </td>
    </tr>
    <tr>
        <td style="font-family: Arial, Helvetica, sans-serif; font-size: medium; color: #00CCFF" 
            align="right" width="180px">
            Giá nhập:</td>
        <td align="left" valign="top" width="300px">
            <asp:TextBox ID="txtGiaNhap" runat="server" BorderColor="#00CCFF" 
                BorderStyle="Dotted" Font-Bold="True" Font-Size="Medium" ForeColor="#00CCFF" 
                Width="280px" BackColor="#FCF8FD"></asp:TextBox>
        </td>
        <td align="left" valign="top" width="20px">
            <asp:RangeValidator ID="RangeValidator3" runat="server" 
                ControlToValidate="txtGiaNhap" ErrorMessage="Bạn chưa nhập sách" 
                ForeColor="#0099FF">(*)</asp:RangeValidator>
        </td>
    </tr>
    <tr>
        <td style="font-family: Arial, Helvetica, sans-serif; font-size: medium; color: #00CCFF" 
            align="right" width="180px">
            Giá bìa:</td>
        <td align="left" valign="top" width="300px">
            <asp:TextBox ID="txtGiaBia" runat="server" BorderColor="#00CCFF" 
                BorderStyle="Dotted" Font-Bold="True" Font-Size="Medium" ForeColor="#00CCFF" 
                Width="280px" BackColor="#FCF8FD"></asp:TextBox>
        </td>
        <td align="left" valign="top" width="20px">
            <asp:RangeValidator ID="RangeValidator4" runat="server" 
                ControlToValidate="txtGiaBia" ErrorMessage="Bạn chưa nhập giá bìa sách" 
                ForeColor="#0099FF">(*)</asp:RangeValidator>
        </td>
    </tr>
    <tr>
        <td style="font-family: Arial, Helvetica, sans-serif; font-size: medium; color: #00CCFF" 
            align="right" xml:lang="180px">
            Giá bán:</td>
        <td align="left" valign="top" width="300px">
            <asp:TextBox ID="txtGiaBan" runat="server" BorderColor="#00CCFF" 
                BorderStyle="Dotted" Font-Bold="True" Font-Size="Medium" ForeColor="#00CCFF" 
                Width="280px" BackColor="#FCF8FD"></asp:TextBox>
        </td>
        <td align="left" valign="top" width="20px">
            <asp:RangeValidator ID="RangeValidator5" runat="server" 
                ControlToValidate="txtGiaBan" ErrorMessage="Bạn chưa nhập giá bán sách" 
                ForeColor="#0099FF">(*)</asp:RangeValidator>
        </td>
    </tr>
    <tr>
        <td style="font-family: Arial, Helvetica, sans-serif; font-size: medium; color: #00CCFF" 
            align="right" width="180px">
            Số lượng:</td>
        <td align="left" valign="top" width="300px">
            <asp:TextBox ID="txtSoLuong" runat="server" BorderColor="#00CCFF" 
                BorderStyle="Dotted" Font-Bold="True" Font-Size="Medium" ForeColor="#00CCFF" 
                Width="280px" BackColor="#FCF8FD"></asp:TextBox>
        </td>
        <td align="left" valign="top" width="20px">
            <asp:RangeValidator ID="RangeValidator7" runat="server" 
                ControlToValidate="txtSoLuong" ErrorMessage="Bạn chưa nhập số lượng sách" 
                ForeColor="#0099FF">(*</asp:RangeValidator>
            <asp:RangeValidator ID="RangeValidator8" runat="server" 
                ErrorMessage="Số lượng phải số" ForeColor="#0099FF" MaximumValue="3200" 
                MinimumValue="0" ControlToValidate="txtSoLuong">*)</asp:RangeValidator>
        </td>
    </tr>
    <tr>
        <td style="font-family: Arial, Helvetica, sans-serif; font-size: medium; color: #00CCFF" 
            align="right" width="180px">
            Loại sách:</td>
        <td align="left" valign="top" width="300px">
            <asp:DropDownList ID="dropLoaiSach" runat="server" BackColor="#FCF8FD" 
                DataSourceID="ObjectDataSource1" DataTextField="TenLoai" 
                DataValueField="MaLoai" Font-Italic="False" Font-Size="Medium" 
                ForeColor="#00CCFF" Width="280px">
            </asp:DropDownList>
        </td>
        <td width="20px">
        </td>
    </tr>
    <tr>
        <td style="font-family: Arial, Helvetica, sans-serif; font-size: medium; color: #00CCFF" 
            align="right" width="180px">
            Hình ảnh:</td>
        <td align="left" valign="top" width="300px">
            <asp:FileUpload ID="uploadHinhSach" runat="server" BackColor="#FCF8FD" 
                BorderColor="#00CCFF" Font-Bold="True" Font-Size="Medium" ForeColor="#00CCFF" />
        </td>
        <td valign="top" align="left" width="20px">
            <asp:RangeValidator ID="RangeValidator6" runat="server" 
                ControlToValidate="uploadHinhSach" 
                ErrorMessage="Bạn chưa up load hình ảnh sách" ForeColor="#0099FF">(*)</asp:RangeValidator>
        </td>
    </tr>
    <tr>
        <td width="180px">
            </td>
        <td align="center" class="style4">
            <asp:Button ID="btnThem" runat="server" Font-Bold="True" Font-Size="Medium" 
                ForeColor="#00CCFF" onclick="btnThem_Click" Text="Thêm" />
            <asp:Button ID="btnNhapLai" runat="server" Font-Bold="True" Font-Size="Medium" 
                ForeColor="#00CCFF" onclick="btnNhapLai_Click" PostBackUrl="~/NhapSachMoi.aspx" 
                Text="Nhập lại" />
        </td>
        <td valign="top" width="20px">
            </td>
    </tr>
    <tr>
        <td width="180px">
            &nbsp;</td>
        <td>
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                ForeColor="#00CCFF" />
        </td>
        <td width="20px">
            &nbsp;</td>
    </tr>
</table>
<p>
    <br />
</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
    SelectMethod="GetAllLoaiSach" TypeName="BussinessObject.LoaiSachController">
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
    SelectMethod="GetAllTacGia" TypeName="BussinessObject.TacGiaController">
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
    SelectMethod="GetOneNXB" TypeName="BussinessObject.NXBContronller">
    <SelectParameters>
        <asp:QueryStringParameter DefaultValue="-1" Name="MaNXB" 
            QueryStringField="MaNXB" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>
